package com.fcscs.cservice.dao;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.fcscs.cservice.domain.ContactInfo;
import com.fcscs.cservice.domain.GuestProfile;
import com.fcscs.cservice.domain.PreferenceCode;
import com.fcscs.cservice.domain.SpecialCode;
import com.fcscs.cservice.domain.VIP;
import com.fcscs.cservice.domain.model.ContactInfoView;
import com.fcscs.cservice.domain.model.GuestProfileFindView;
import com.fcscs.cservice.domain.model.GuestProfileView;
import com.fcscs.cservice.domain.model.GuestProfileViewForFile;
import com.fcscs.cservice.domain.model.ReservationView;

@Repository
public interface GuestProfileDao {

	List<GuestProfileFindView> findGuestProfile(long propId, String firstName, String lastName, String roomNo, String phoneNo,
			String mobileNo, String memberNo, int start, int resultCnt, boolean inHouseGuestOnly);

	int findGuestProfileCnt(long propId, String firstName, String lastName, String roomNo, String phoneNo,
			String mobileNo, String memberNo, boolean inHouseGuestOnly);

	<E extends GuestProfile> E getGuestProfile(long id, Class<E> cls);

	<E extends GuestProfile> E updateGuestProfile(E guestProfile);

	ContactInfo getContactInfo(long id);

	ContactInfo updateContactInfo(ContactInfo contactInfo);

	Map<Long, List<ReservationView.Membership>> getMemberships(Set<Long> gpIds);

	GuestProfileView getGuestProfileView(long id);

	GuestProfileViewForFile getGuestProfileViewForFile(long id);

	List<ContactInfo> getAddresses(long guestProfileId);

	List<PreferenceCode> getPrefCodes(long guestProfileId);

	List<SpecialCode> getSpecialCodes(long guestProfileId);

	List<VIP> getVIPs(long guestProfileId);

	List<ContactInfoView> getContactInfoViews(long guestProfileId);

	String getPrefCodesString(long guestProfileId);

	String getSpecialCodesString(long guestProfileId);

	String getVIPCodesString(long guestProfileId);

	boolean updateGuestContactInfo(Long guestProfileViewId, Long contactInfoViewId);
}
